﻿using Clinent.Main.Data;
using Clinent.Main.Model;
using GalaSoft.MvvmLight.Messaging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Clinent.Main.View.MainWindow
{
    /// <summary>
    /// MainWindow 左侧菜单栏
    /// </summary>
    public partial class UcLeftMenu
    {
        public UcLeftMenu()
        {
            InitializeComponent();
        }

        private void UcLeftMenu_Loaded(object sender, RoutedEventArgs e)
        {
            if(lbMenu.Items.Count > 0)
            {
                if(lbMenu.Items[0] is MenuModel menu)
                {
                    Messenger.Default.Send(menu, MessengerTokenData.OpenFirstMenu);
                }
            }
        }
    }
}
